package net.fpeg.kotlin.msa.auth.service

import net.fpeg.kotlin.msa.auth.dao.UserDao
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service

@Service
class InfoService {
    @Autowired
    lateinit var userDao: UserDao

    fun get(uid: Long) = userDao.getById(uid)
    fun getOne(uid: Long) = get(uid) ?: throw Exception("没得")
}